<li id="choice_customer" style="display: list-item;">
	<label>客户:</label>
	<span class="mod-choose-input" id="choice_customer_wrap">
		<input type="text" class="ui-input" id="choice_customer_name" autocomplete="off"><span
		class="ui-icon-ellipsis" onclick="choice_customer()"></span>
	</span>
</li>
<input type="hidden" id="user_id" value="" autocomplete="off" readonly="">
<script type="text/javascript">
		function choice_customer() {
		layer.open({
			type: 2,
			title: "选择客户",
			shadeClose: true,
			shade: 0.3,
			maxmin: false, //开启最大化最小化按钮
			area: ['555px', '490px'],
			fixed: false, //不固定
			btn: ['确定', '取消'],
			content: "/admin/basic/choose_customer.html?single=0&is_customer=1",//多选，客户
			btn1: function (index, layero) {
				var body = layer.getChildFrame('body', index);
				//获取所有选中行
				var ids =  body.find("#grid").jqGrid('getGridParam','selarrrow');

				if (ids == '' || ids == null) {
					layer.msg("请选择客户");
					return false;
				} else {
					//获取客户信息
					$.get("/admin/basic/one_customer.html?more=1", { ids: ids }, function (data, state) {
						if (data.status == 1) {
							$("#choice_customer_name").val(data.info.names);
							$('#user_id').val(data.info.ids);
						} else {
							layer.msg("获取信息失败");
						}
					})
				}
				layer.close(index);
				return false;
			},
			btn4: function (index, layero) {
				layer.close(index);
				return false;
			}
		})
	}
</script>